import request from '@/utils/request'

/**
   * 货区列表
   * @param {
   * pageIndex：int
   * pageSize：int
   * warehouseId：int}
   * @returns {Array}
   */
export function getWarehouseAreaList(data) {
  return request({
    url: '/api/wms/warehouse_area/list',
    method: 'post',
    data
  })
}

/**
   * 货区状态信息
   * @param {
    * pageIndex：int
    * pageSize：int
    * warehouseId：int}
    * @returns {Array}
    */
export function getWarehouseAreaOptionsList(data) {
  return request({
    url: '/api/wms/warehouse_area/list_pre_options',
    method: 'get'
  })
}

/**
   * 编辑货区
   * @param {
    * pageIndex：int
    * pageSize：int
    * warehouseId：int}
    * @returns {Array}
    */
export function updateWarehouseArea(data) {
  return request({
    url: '/api/wms/warehouse_area/update',
    method: 'post',
    data
  })
}

/**
   * 新建货区
   * @param {
    * pageIndex：int
    * pageSize：int
    * warehouseId：int}
    * @returns {Array}
    */
export function saveWarehouseArea(data) {
  return request({
    url: '/api/wms/warehouse_area/save',
    method: 'post',
    data
  })
}
